/**
 * @properties={typeid:24,uuid:"9B827A94-B16E-4A56-9155-64E87FEAD6C3"}
 */
function onDataChangeTipo() {
	switch( tipo )
	{
		case 1:
		{
			//valor_txt = null
			valor_int = null
			valor_num = null
			elements.valor_txt.enabled = 1
			elements.valor_int.enabled = 0
			elements.valor_num.enabled = 0
			break;
		}
		case 2:
		{
			valor_txt = null
			//valor_int = null
			valor_num = null
			elements.valor_txt.enabled = 0
			elements.valor_int.enabled = 1
			elements.valor_num.enabled = 0
			break;
		}
		case 3:
		{
			valor_txt = null
			valor_int = null
			//valor_num = null
			elements.valor_txt.enabled = 0
			elements.valor_int.enabled = 0
			elements.valor_num.enabled = 1
			break;
		}
	}
	return true
}

/**
 * @properties={typeid:24,uuid:"BB40A41B-D0F8-466D-A172-B7AEAAEC7241"}
 */
function onDataChangeVl() {
	var $elem
	switch( tipo )
	{
		case 1:
		{
			//valor_txt = null
			$elem = 'valor_txt'
			break;
		}
		case 2:
		{
			//valor_int = null
			$elem = 'valor_int'
			break;
		}
		case 3:
		{
			//valor_num = null
			$elem = 'valor_num'
			break;
		}
	}
	
	var $frm = solutionModel.getForm('param_app_dtl')
	var $fld = $frm.getField($elem)
	$fld.valuelist = solutionModel.getValueList(valuelist)
	forms[$frm.name].controller.recreateUI()
	onDataChangeTipo()
	return true
}

/**
 * Handle record selected.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"DF4DCD84-A612-4323-8E72-E4FF4EF61D44"}
 */
function onRecordSelection(event) {
	onDataChangeVl()
	
}
